1
0
mirror of synced 2026-05-22 21:33:16 +00:00

Use Base64 implementation provided by Java 8

This commit is contained in:
Vedran Pavic
2017-05-08 18:58:33 +02:00
committed by Rob Winch
parent fe37d0f5f9
commit 85719fcd64
19 changed files with 240 additions and 931 deletions
@@ -15,7 +15,8 @@
*/
package org.springframework.security.oauth2.client.authentication;
import org.springframework.security.crypto.codec.Base64;
import java.util.Base64;
import org.springframework.security.crypto.keygen.BytesKeyGenerator;
import org.springframework.security.crypto.keygen.KeyGenerators;
import org.springframework.security.crypto.keygen.StringKeyGenerator;
@@ -49,6 +50,6 @@ public class DefaultStateGenerator implements StringKeyGenerator {
@Override
public String generateKey() {
return new String(Base64.encode(keyGenerator.generateKey()));
return new String(Base64.getEncoder().encode(keyGenerator.generateKey()));
}
}