Package com.iizix.push
Class VAPIDKeys
java.lang.Object
com.iizix.push.VAPIDKeys
Helper class to generate VAPID keys for use with Push notification.
- Author:
- Christopher Mindus
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- static String[]Generates a public key and a private key.- static String- validatePrivateKey- (String privateKey) Validates the private key Base64 encoded string.- static String- validatePublicKey- (String publicKey) Validates the public key Base64 encoded string.
- Constructor Details- VAPIDKeyspublic VAPIDKeys()
 
- Method Details- generateKeysGenerates a public key and a private key.- Returns:
- Array of 2 String's: first the public key, then the private key.
- Throws:
- IllegalStateException- NOTE: try-catch on it! In case of BouncyCastle errors.
 
- validatePublicKeyValidates the public key Base64 encoded string.- Parameters:
- publicKey- The public key to validate.
- Returns:
- A validation message, or nullfor success.
 
- validatePrivateKeyValidates the private key Base64 encoded string.- Parameters:
- privateKey- The private key to validate.
- Returns:
- A validation message, or nullfor success.