+ public String getRegistrationLock() {
+ final var masterKey = getPinBackedMasterKey();
+ if (masterKey == null) {
+ return null;
+ }
+ return masterKey.deriveRegistrationLock();
+ }
+
+ public MasterKey getPinBackedMasterKey() {
+ if (registrationLockPin == null) {
+ return null;
+ }
+ return pinMasterKey;
+ }
+
+ public MasterKey getOrCreatePinMasterKey() {
+ if (pinMasterKey == null) {
+ pinMasterKey = KeyUtils.createMasterKey();
+ save();
+ }