public String getSignature ( String path ) { byte [ ] digest = getMac ( ) . doFinal ( path . getBytes ( UTF_8 ) ) ; return ByteString . of ( digest ) . base64 ( ) . replace ( ' ' , ' ' ) . replace ( ' ' , ' ' ) ; }
Generate url safe HmacSHA1 of a path .