Source

Grails Spring Security Taobao / src / groovy / test / Test.groovy

Full commit
package test

import org.apache.commons.codec.digest.DigestUtils
import org.apache.commons.codec.binary.Base64


class Test {
    static void main(args) {
        String appKey = '12264981'
        String p ='ZXhwaXJlc19pbj04NTgxMCZpZnJhbWU9MSZyMV9leHBpcmVzX2luPTg1ODExJnIyX2V4cGlyZXNfaW49ODU4MTEmcmVfZXhwaXJlc19pbj04NTgxMCZyZWZyZXNoX3Rva2VuPTYxMDA4MDhmZjc3MTdjZDIxNzQ1ZDgzYTY3ZjhlZWUwY2UyYzQ1NWJlOWVhMWNiNTQ0NTg2NzQmdHM9MTM0NjU2NzkzNTQyNCZ2aXNpdG9yX2lkPTU0NDU4Njc0JnZpc2l0b3Jfbmljaz1sOTU1NjY1MDUmdzFfZXhwaXJlc19pbj04NTgxMSZ3Ml9leHBpcmVzX2luPTA='
        String s = '4aaaabc0a7057c3fd36b8de889d4aa65'
        String session = '6102608ed396a1d6197f646a1b3b889da61442f607d07fd54458674'
        String text = appKey + p + session + s
        def md5  = DigestUtils.md5(text)
        println Base64.encodeBase64String(md5)
		
		//d();
    }
	
	public static d() {
		String url = 'top_appkey=12264981&top_parameters=ZXhwaXJlc19pbj04NTgxMCZpZnJhbWU9MSZyMV9leHBpcmVzX2luPTg1ODExJnIyX2V4cGlyZXNfaW49ODU4MTEmcmVfZXhwaXJlc19pbj04NTgxMCZyZWZyZXNoX3Rva2VuPTYxMDA4MDhmZjc3MTdjZDIxNzQ1ZDgzYTY3ZjhlZWUwY2UyYzQ1NWJlOWVhMWNiNTQ0NTg2NzQmdHM9MTM0NjU2NzkzNTQyNCZ2aXNpdG9yX2lkPTU0NDU4Njc0JnZpc2l0b3Jfbmljaz1sOTU1NjY1MDUmdzFfZXhwaXJlc19pbj04NTgxMSZ3Ml9leHBpcmVzX2luPTA%3D&top_session=6102608ed396a1d6197f646a1b3b889da61442f607d07fd54458674&from_site=fuwu&top_sign=rw%2B3NEpjMD35nN1%2FvXLCjw%3D%3D';
		println URLDecoder.decode(url, "UTF-8")
	}

    public void s() {

    }
}