Actually it can be used to generate key too as shown here:
https://github.com/aerogear/aerogear-ios/blob/master/AeroGear-iOS/AeroGear-iOS/security/AGPasswordKeyServices.m#L108