public static boolean unregisterPrivateKeyObfuscator(PrivateKeyObfuscator o) { Objects.requireNonNull(o, "No instance provided"); String cipherName = o.getCipherName(); ValidateUtils.checkNotNullAndNotEmpty(cipherName, "No cipher name"); synchronized (OBFUSCATORS) { PrivateKeyObfuscator prev = OBFUSCATORS.get(cipherName); if (prev != o) { return false; } OBFUSCATORS.remove(cipherName); } return true; }
public static boolean unregisterPrivateKeyObfuscator(PrivateKeyObfuscator o) { Objects.requireNonNull(o, "No instance provided"); String cipherName = o.getCipherName(); ValidateUtils.checkNotNullAndNotEmpty(cipherName, "No cipher name"); synchronized (OBFUSCATORS) { PrivateKeyObfuscator prev = OBFUSCATORS.get(cipherName); if (prev != o) { return false; } OBFUSCATORS.remove(cipherName); } return true; }
public static PrivateKeyObfuscator registerPrivateKeyObfuscator(PrivateKeyObfuscator o) { return registerPrivateKeyObfuscator(Objects.requireNonNull(o, "No instance provided").getCipherName(), o); }
public static PrivateKeyObfuscator registerPrivateKeyObfuscator(PrivateKeyObfuscator o) { return registerPrivateKeyObfuscator(Objects.requireNonNull(o, "No instance provided").getCipherName(), o); }
public static final <C extends PrivateKeyEncryptionContext> C initializeObfuscator(C context, PrivateKeyObfuscator o, String password) { context.setCipherName(o.getCipherName()); context.setPrivateKeyObfuscator(o); context.setPassword(password); return context; } }
public static final <C extends PrivateKeyEncryptionContext> C initializeObfuscator(C context, PrivateKeyObfuscator o, String password) { context.setCipherName(o.getCipherName()); context.setPrivateKeyObfuscator(o); context.setPassword(password); return context; } }